package com.thucydides.test.steps;



import org.jbehave.core.annotations.Given;
import org.jbehave.core.annotations.Then;
import org.jbehave.core.annotations.When;
import org.junit.runner.RunWith;
import net.thucydides.junit.runners.ThucydidesRunner;
import com.aol.library.AolLibrary;


/* Author - Payal Garg
   StoryName -view_homepage.story
   Date created - 17-06-2013*/

@RunWith(ThucydidesRunner.class)
public class ViewHomepageScenarioSteps {
	
	AolLibrary aol;
	public ViewHomepageScenarioSteps() throws Exception{
		aol = new AolLibrary();
		}

	@Given("I am a shopper")
	public void ImShopper() {
		System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");	
	}
	
	@When("I enter $URL")
	public void viewHomePage(String URL) throws Exception{
		System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
		aol.openURL(URL);
		aol.maximise();
	}
	
	@Then("I see $Home homepage")
	public void searchProduct(String home) throws Exception {
		try{
			System.out.println("viewing homepage " + home);
				} catch (Exception e) {
				e.printStackTrace();
			}	
	}	

}
